package br.uff.gdse.positionevaluation.util;

import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.Database;
import org.xmldb.api.base.XMLDBException;

public class DBUtil {

	public static Database registerDabatase(String driver) throws XMLDBException, ClassNotFoundException, InstantiationException, IllegalAccessException {
		Class cl = Class.forName(driver);
        Database database = (Database) cl.newInstance();
        database.setProperty("create-database", "true");
        DatabaseManager.registerDatabase(database);
        
        return database;
	}
	
	
}
